<?php
namespace app\app\controller;

use think\Controller;
class Token extends Controller {
    // token生成
    public function index() {
        if(request()->isPost()) {
            //获取相关的数据
            $data = input('post.');
            $username = $data['post_username'];
            return json_encode($username);
        }
    }

}